import Image from 'next/image'
import { StoreProvider, useStores } from '@/store/index';
import dynamic from 'next/dynamic';
import '@/assets/font/iconfont.css'
import "@/assets/css/tailwind.css"
import "@/assets/css/global.css"
import Head from 'next/head';
import React from 'react';

 
const NoSSR = (props:any) => <React.Fragment>{props.children}</React.Fragment>;

const NoSSRJSX= dynamic(() => Promise.resolve(NoSSR), {
    ssr: false
});


export default function App(props: { Component: any; pageProps: any }) {
  const { Component, pageProps } = props
  const store = useStores();
  store.loingInfo.getjssdk();
  
  // useAsyncEffect(async ()=>{
  //   const res=await  getxcxjssdk()
  // },[])
   
  return (
    <StoreProvider>
      <Head>
        <title>怪兽AI-AI绘图助你释放创造力</title>
        <meta name="description" content="零基础，轻松绘画！尽情探索AI绘画的无限可能！先这样吧" />
        <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
      </Head>
      <div className='w-full h-auto bg-FFE5E5  main'>
        <NoSSRJSX><Component pageProps={...pageProps}></Component></NoSSRJSX>
      </div>
    </StoreProvider>
  )
}
